package com.googlecode.tracey.messageserver;

import com.googlecode.utterlyidle.Application;
import com.googlecode.utterlyidle.httpserver.RestServer;

import static com.googlecode.tracey.messageserver.LogDirectory.logDirectory;
import static com.googlecode.utterlyidle.BasePath.basePath;
import static com.googlecode.utterlyidle.ServerConfiguration.defaultConfiguration;

public class Server {

    public static void main(String[] args) throws Exception {
        Application application = new WebApplication(basePath("/"), new ConfigurationModule(logDirectory(args[0])));
        new RestServer(application, defaultConfiguration().port(9001));
    }
}
